package com.framework.app;

import android.view.View;
import android.widget.TextView;

import com.chenenyu.router.Router;
import com.chenenyu.router.RouterRouteTable;
import com.framework.app.contract.MainContract;
import com.framework.app.databinding.ActivityMainBinding;
import com.framework.app.presenter.MainPresenter;
import com.linliangxu.framework.base.RootActivity;
import com.llx.use.Threads;

public class MainActivity extends RootActivity<ActivityMainBinding, MainPresenter> implements MainContract.View, View.OnClickListener {


    @Override
    protected void inject() {
        Router.handleRouteTable(new RouterRouteTable());
        setLoadingResource(R.layout.view_progress_dark);
        setEmptyResource(R.layout.view_empty_custom);
    }


    @Override
    protected void initial() {
        //empty("空数据了");
        views.content.setOnClickListener(this);

        request();

        Threads.ui(() -> {
            response();
            main();
        }, 5000);
    }

    @Override
    public void show() {
    }

    @Override
    public void onClick(View v) {
        Router.build("setting").go(this);
    }
}